package t327.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import t327.mapper.MaterialsMapper;
import t327.mapper.SampleSheetMapper;
import t327.pojo.*;
import t327.pojo.views.SampleSheetListView;
import t327.service.iter.ISampleSheetService;

import java.util.List;


@Service
@Transactional
public class SampleSheetServiceImpl implements ISampleSheetService {
    @Autowired
    private SampleSheetMapper sampleSheetMapper;
    @Autowired
    private MaterialsMapper materialsMapper;

    @Override
    public List<SampleSheetListView> getAllSampleSheetList() {
        return sampleSheetMapper.getAllSampleSheetList();
    }

    @Override
    public SampleSheetListView getSampleSheetById(Long sampleSheetId) {
        return sampleSheetMapper.getSampleSheetById(sampleSheetId);
    }

    @Override
    public int updateSubmitStatus(Long sampleSheetId) {
        return sampleSheetMapper.updateSubmitStatus(sampleSheetId);
    }

    @Override
    public int addSampleSheet(SampleSheet sampleSheet) {
        return sampleSheetMapper.addSampleSheet(sampleSheet);
    }

    @Override
    public List<SampleSheetAndMaterials> getAllMaterialsById(Long sampleSheetId) {
        return materialsMapper.getAllMaterialsById(sampleSheetId);
    }

    @Override
    public List<SampleSheetAndMaterials> getAllLngredientsById(Long sampleSheetId) {
        return materialsMapper.getAllLngredientsById(sampleSheetId);
    }

    @Override
    public StyleNumSizeChart StyleNumSizeByS(Long styleNumberId) {
        return sampleSheetMapper.StyleNumSizeByS(styleNumberId);
    }

    @Override
    public StyleNumSizeChart StyleNumSizeByM(Long styleNumberId) {
        return sampleSheetMapper.StyleNumSizeByM(styleNumberId);
    }

    @Override
    public StyleNumSizeChart StyleNumSizeByL(Long styleNumberId) {
        return sampleSheetMapper.StyleNumSizeByL(styleNumberId);
    }

    @Override
    public StyleNumSizeChart StyleNumSizeByXL(Long styleNumberId) {
        return sampleSheetMapper.StyleNumSizeByXL(styleNumberId);
    }

    @Override
    public StyleNumSizeChart StyleNumSizeByXXL(Long styleNumberId) {
        return sampleSheetMapper.StyleNumSizeByXXL(styleNumberId);
    }

    @Override
    public StyleNumSizeChart StyleNumSizeBy3XL(Long styleNumberId) {
        return sampleSheetMapper.StyleNumSizeBy3XL(styleNumberId);
    }

    @Override
    public StyleNumSizeChart StyleNumSizeBy4XL(Long styleNumberId) {
        return sampleSheetMapper.StyleNumSizeBy4XL(styleNumberId);
    }

    @Override
    public List<SampleSheetListView> getSheetListView(SampleSheetListView sampleSheetListView) {
        return sampleSheetMapper.getSheetListView(sampleSheetListView);
    }

    @Override
    public List<SampleSheetAndMaterials> getAllMaterials() {
        return materialsMapper.getAllMaterials();
    }

    @Override
    public List<SampleSheetAndMaterials> getAllLngredients() {
        return materialsMapper.getAllLngredients();
    }

}
